//
//  BaseTableViewController.swift
//  weibo
//
//  Created by David on 15/11/13.
//  Copyright © 2015年 DV. All rights reserved.
//

import UIKit

class BaseTableViewController: UITableViewController,clickDelegate {
   var islogin = UserAccount.loadAccount()?.access_token != nil
   var visitor = VisitorView()
//    var visitor : VisitorView?
    override func loadView() {
        islogin ? super.loadView() : setupUI()
        print(islogin)
        visitor.delegate = self
    }
    private func setupUI(){
        view = visitor
//        view.backgroundColor = UIColor.orangeColor()
        

    }
    func loginWillClick() {
        let vc = UINavigationController(rootViewController: OAuthController())
        vc.view.backgroundColor = UIColor.whiteColor()
        presentViewController(vc, animated: true, completion: nil)
        
        
    }
   }
